Optimal. Leaf size=95 \[ -\frac {2 \sqrt [4]{-1} \text {ArcTan}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1-(-1)^{2/3}\right )}-\frac {2 \sqrt [4]{-1} \tanh ^{-1}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1+\sqrt [3]{-1}\right )}-\frac {\sinh (x)}{3 (1-\cosh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3292, 2727,
2738, 214, 211} \begin {gather*} -\frac {2 \sqrt [4]{-1} \text {ArcTan}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1-(-1)^{2/3}\right )}-\frac {2 \sqrt [4]{-1} \tanh ^{-1}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1+\sqrt [3]{-1}\right )}-\frac {\sinh (x)}{3 (1-\cosh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 214
Rule 2727
Rule 2738
Rule 3292
Rubi steps
\begin {align*} \int \frac {1}{1-\cosh ^3(x)} \, dx &=\int \left (\frac {1}{3 (1-\cosh (x))}+\frac {1}{3 \left (1+\sqrt [3]{-1} \cosh (x)\right )}+\frac {1}{3 \left (1-(-1)^{2/3} \cosh (x)\right )}\right ) \, dx\\ &=\frac {1}{3} \int \frac {1}{1-\cosh (x)} \, dx+\frac {1}{3} \int \frac {1}{1+\sqrt [3]{-1} \cosh (x)} \, dx+\frac {1}{3} \int \frac {1}{1-(-1)^{2/3} \cosh (x)} \, dx\\ &=-\frac {\sinh (x)}{3 (1-\cosh (x))}+\frac {2}{3} \text {Subst}\left (\int \frac {1}{1+\sqrt [3]{-1}-\left (1-\sqrt [3]{-1}\right ) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )+\frac {2}{3} \text {Subst}\left (\int \frac {1}{1-(-1)^{2/3}-\left (1+(-1)^{2/3}\right ) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )\\ &=-\frac {2 \sqrt [4]{-1} \tan ^{-1}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1-(-1)^{2/3}\right )}-\frac {2 \sqrt [4]{-1} \tanh ^{-1}\left (\frac {(-1)^{3/4} \tanh \left (\frac {x}{2}\right )}{\sqrt [4]{3}}\right )}{3^{3/4} \left (1+\sqrt [3]{-1}\right )}-\frac {\sinh (x)}{3 (1-\cosh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.36, size = 147, normalized size = 1.55 \begin {gather*} \frac {\left (3 i+\sqrt {3}\right ) \text {ArcTan}\left (\frac {\left (1-i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {2 \left (3-i \sqrt {3}\right )}}\right )}{3 \sqrt {\frac {3}{2} \left (3-i \sqrt {3}\right )}}+\frac {\left (-3 i+\sqrt {3}\right ) \text {ArcTan}\left (\frac {\left (1+i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {2 \left (3+i \sqrt {3}\right )}}\right )}{3 \sqrt {\frac {3}{2} \left (3+i \sqrt {3}\right )}}+\frac {1}{3} \coth \left (\frac {x}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(189\) vs.
\(2(71)=142\).
time = 0.49, size = 190, normalized size = 2.00
method | result | size |
risch | \(\frac {2}{3 \left ({\mathrm e}^{x}-1\right )}+\left (\munderset {\textit {\_R} =\RootOf \left (243 \textit {\_Z}^{4}-27 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left (162 \textit {\_R}^{3}-27 \textit {\_R}^{2}-9 \textit {\_R} +{\mathrm e}^{x}+2\right )\right )\) | \(46\) |
default | \(\frac {1}{3 \tanh \left (\frac {x}{2}\right )}+\frac {3^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )+\sqrt {2}\, 3^{\frac {1}{4}} \tanh \left (\frac {x}{2}\right )+\sqrt {3}}{\tanh ^{2}\left (\frac {x}{2}\right )-\sqrt {2}\, 3^{\frac {1}{4}} \tanh \left (\frac {x}{2}\right )+\sqrt {3}}\right )+2 \arctan \left (\frac {3^{\frac {3}{4}} \tanh \left (\frac {x}{2}\right ) \sqrt {2}}{3}+1\right )+2 \arctan \left (\frac {3^{\frac {3}{4}} \tanh \left (\frac {x}{2}\right ) \sqrt {2}}{3}-1\right )\right )}{12}-\frac {3^{\frac {3}{4}} \sqrt {2}\, \left (\ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )-\sqrt {2}\, 3^{\frac {1}{4}} \tanh \left (\frac {x}{2}\right )+\sqrt {3}}{\tanh ^{2}\left (\frac {x}{2}\right )+\sqrt {2}\, 3^{\frac {1}{4}} \tanh \left (\frac {x}{2}\right )+\sqrt {3}}\right )+2 \arctan \left (\frac {3^{\frac {3}{4}} \tanh \left (\frac {x}{2}\right ) \sqrt {2}}{3}+1\right )+2 \arctan \left (\frac {3^{\frac {3}{4}} \tanh \left (\frac {x}{2}\right ) \sqrt {2}}{3}-1\right )\right )}{36}\) | \(190\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 602 vs.
\(2 (67) = 134\).
time = 0.38, size = 602, normalized size = 6.34 \begin {gather*} -\frac {4 \, {\left (3^{\frac {3}{4}} e^{x} - 3^{\frac {3}{4}}\right )} \sqrt {-4 \, \sqrt {3} + 8} \arctan \left (\frac {1}{12} \, {\left (\sqrt {3} {\left (\sqrt {3} + 3\right )} - 3 \, \sqrt {3} + 9\right )} e^{x} - \frac {1}{48} \, {\left (2 \, \sqrt {3} {\left (\sqrt {3} + 3\right )} - {\left (3^{\frac {3}{4}} {\left (3 \, \sqrt {3} + 5\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} + 1\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} - 6 \, \sqrt {3} + 18\right )} \sqrt {2 \, {\left (3^{\frac {1}{4}} {\left (\sqrt {3} + 2\right )} + 3^{\frac {1}{4}} e^{x}\right )} \sqrt {-4 \, \sqrt {3} + 8} + 4 \, \sqrt {3} + 4 \, e^{\left (2 \, x\right )} + 4 \, e^{x} + 4} - \frac {1}{12} \, \sqrt {3} {\left (\sqrt {3} - 3\right )} - \frac {1}{24} \, {\left ({\left (3^{\frac {3}{4}} {\left (3 \, \sqrt {3} + 5\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} + 1\right )}\right )} e^{x} + 3^{\frac {3}{4}} {\left (\sqrt {3} + 1\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} - 1\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} - \frac {1}{4} \, \sqrt {3} + \frac {1}{4}\right ) + 4 \, {\left (3^{\frac {3}{4}} e^{x} - 3^{\frac {3}{4}}\right )} \sqrt {-4 \, \sqrt {3} + 8} \arctan \left (-\frac {1}{12} \, {\left (\sqrt {3} {\left (\sqrt {3} + 3\right )} - 3 \, \sqrt {3} + 9\right )} e^{x} + \frac {1}{48} \, {\left (2 \, \sqrt {3} {\left (\sqrt {3} + 3\right )} + {\left (3^{\frac {3}{4}} {\left (3 \, \sqrt {3} + 5\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} + 1\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} - 6 \, \sqrt {3} + 18\right )} \sqrt {-2 \, {\left (3^{\frac {1}{4}} {\left (\sqrt {3} + 2\right )} + 3^{\frac {1}{4}} e^{x}\right )} \sqrt {-4 \, \sqrt {3} + 8} + 4 \, \sqrt {3} + 4 \, e^{\left (2 \, x\right )} + 4 \, e^{x} + 4} + \frac {1}{12} \, \sqrt {3} {\left (\sqrt {3} - 3\right )} - \frac {1}{24} \, {\left ({\left (3^{\frac {3}{4}} {\left (3 \, \sqrt {3} + 5\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} + 1\right )}\right )} e^{x} + 3^{\frac {3}{4}} {\left (\sqrt {3} + 1\right )} + 3 \cdot 3^{\frac {1}{4}} {\left (\sqrt {3} - 1\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} + \frac {1}{4} \, \sqrt {3} - \frac {1}{4}\right ) + {\left (3^{\frac {1}{4}} {\left (2 \, \sqrt {3} + 3\right )} e^{x} - 3^{\frac {1}{4}} {\left (2 \, \sqrt {3} + 3\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} \log \left (2 \, {\left (3^{\frac {1}{4}} {\left (\sqrt {3} + 2\right )} + 3^{\frac {1}{4}} e^{x}\right )} \sqrt {-4 \, \sqrt {3} + 8} + 4 \, \sqrt {3} + 4 \, e^{\left (2 \, x\right )} + 4 \, e^{x} + 4\right ) - {\left (3^{\frac {1}{4}} {\left (2 \, \sqrt {3} + 3\right )} e^{x} - 3^{\frac {1}{4}} {\left (2 \, \sqrt {3} + 3\right )}\right )} \sqrt {-4 \, \sqrt {3} + 8} \log \left (-2 \, {\left (3^{\frac {1}{4}} {\left (\sqrt {3} + 2\right )} + 3^{\frac {1}{4}} e^{x}\right )} \sqrt {-4 \, \sqrt {3} + 8} + 4 \, \sqrt {3} + 4 \, e^{\left (2 \, x\right )} + 4 \, e^{x} + 4\right ) - 24}{36 \, {\left (e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 320 vs.
\(2 (78) = 156\).
time = 1.70, size = 320, normalized size = 3.37 \begin {gather*} - \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} - 4 \sqrt {2} \cdot \sqrt [4]{3} \tanh {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{12} - \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} - 4 \sqrt {2} \cdot \sqrt [4]{3} \tanh {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{36} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} + 4 \sqrt {2} \cdot \sqrt [4]{3} \tanh {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{36} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} + 4 \sqrt {2} \cdot \sqrt [4]{3} \tanh {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{12} - \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tanh {\left (\frac {x}{2} \right )}}{3} - 1 \right )}}{18} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tanh {\left (\frac {x}{2} \right )}}{3} - 1 \right )}}{6} - \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tanh {\left (\frac {x}{2} \right )}}{3} + 1 \right )}}{18} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tanh {\left (\frac {x}{2} \right )}}{3} + 1 \right )}}{6} + \frac {1}{3 \tanh {\left (\frac {x}{2} \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 275 vs.
\(2 (67) = 134\).
time = 0.43, size = 275, normalized size = 2.89 \begin {gather*} -\frac {1}{18} \, \sqrt {6 \, \sqrt {3} + 9} \log \left (4 \, {\left (2 \, \sqrt {3} \sqrt {6 \, \sqrt {3} + 9} - 3 \, \sqrt {6 \, \sqrt {3} + 9} + 6 \, e^{x} + 3\right )}^{2} + 4 \, {\left (\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} + 3 \, \sqrt {3}\right )}^{2}\right ) + \frac {1}{18} \, \sqrt {6 \, \sqrt {3} + 9} \log \left (4 \, {\left (2 \, \sqrt {3} \sqrt {6 \, \sqrt {3} + 9} - 3 \, \sqrt {6 \, \sqrt {3} + 9} - 6 \, e^{x} - 3\right )}^{2} + 4 \, {\left (\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} - 3 \, \sqrt {3}\right )}^{2}\right ) + \frac {\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} \arctan \left (\frac {3 \, {\left (\sqrt {2 \, \sqrt {3} - 3} + 2 \, e^{x} + 1\right )}}{\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} + 3 \, \sqrt {3}}\right )}{9 \, {\left (2 \, \sqrt {3} + 3\right )}} + \frac {\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} \arctan \left (-\frac {3 \, {\left (\sqrt {2 \, \sqrt {3} - 3} - 2 \, e^{x} - 1\right )}}{\sqrt {3} \sqrt {6 \, \sqrt {3} + 9} - 3 \, \sqrt {3}}\right )}{9 \, {\left (2 \, \sqrt {3} + 3\right )}} + \frac {2}{3 \, {\left (e^{x} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.42, size = 295, normalized size = 3.11 \begin {gather*} \ln \left (\frac {32\,{\mathrm {e}}^x}{3}+\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (\frac {32\,{\mathrm {e}}^x}{3}-\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (384\,{\mathrm {e}}^x+\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (1152\,{\mathrm {e}}^x+864\right )+192\right )+\frac {160}{3}\right )+\frac {128}{9}\right )\,\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}+\ln \left (\frac {32\,{\mathrm {e}}^x}{3}+\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (\frac {32\,{\mathrm {e}}^x}{3}-\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (384\,{\mathrm {e}}^x+\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (1152\,{\mathrm {e}}^x+864\right )+192\right )+\frac {160}{3}\right )+\frac {128}{9}\right )\,\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}-\ln \left (\frac {32\,{\mathrm {e}}^x}{3}-\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (\frac {32\,{\mathrm {e}}^x}{3}+\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (384\,{\mathrm {e}}^x-\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (1152\,{\mathrm {e}}^x+864\right )+192\right )+\frac {160}{3}\right )+\frac {128}{9}\right )\,\sqrt {\frac {1}{18}-\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}-\ln \left (\frac {32\,{\mathrm {e}}^x}{3}-\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (\frac {32\,{\mathrm {e}}^x}{3}+\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (384\,{\mathrm {e}}^x-\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}\,\left (1152\,{\mathrm {e}}^x+864\right )+192\right )+\frac {160}{3}\right )+\frac {128}{9}\right )\,\sqrt {\frac {1}{18}+\frac {\sqrt {3}\,1{}\mathrm {i}}{54}}+\frac {2}{3\,\left ({\mathrm {e}}^x-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________